<template>
  <div class="rank">
    <h3 class="title">{{ title }}</h3>
    <ul class="list" :style="{height:height?`${height}px`:'auto',overflow:'auto'}">
      <li >
        <span :class="'active'">1</span>
        <span>自办量</span>
        <span>{{ object.replyNum }}</span>
      </li>
      <li >
        <span :class="'active'">2</span>
        <span>转办量</span>
        <span>{{ object.transferNum }}</span>
      </li>
      <li >
        <span :class="'active'">3</span>
        <span>意见建议类</span>
        <span>{{ object.opinionNum }}</span>
      </li>
      <li >
        <span :class="'active'">4</span>
        <span>申诉类</span>
        <span>{{ object.appealNum }}</span>
      </li>
      <li >
        <span :class="'active'">5</span>
        <span>求决类</span>
        <span>{{ object.decideNum }}</span>
      </li>
      <li >
        <span :class="'active'">6</span>
        <span>揭发控告类</span>
        <span>{{ object.exposeNum }}</span>
      </li>    <li >
      <span :class="'active'">7</span>
      <span>咨询类</span>
      <span>{{ object.adviceNum }}</span>
    </li>
      <li >
        <span :class="'active'">8</span>
        <span>其他类</span>
        <span>{{ object.otherNum }}</span>
      </li>
      <li >
        <span :class="'active'">9</span>
        <span>重件类</span>
        <span>{{ object.repeatNum }}</span>
      </li>
      <li >
        <span :class="'active'">10</span>
        <span>未评价件</span>
        <span>{{ object.notEvaluatedNum }}</span>
      </li>
      <li >
        <span :class="'active'">11</span>
        <span>不满意件</span>
        <span>{{ object.dissatisfiedNum }}</span>
      </li>
      <li >
        <span :class="'active'">12</span>
        <span>满意基本满意件</span>
        <span>{{ object.satisfiedNum }}</span>
      </li>
      <li >
        <span :class="'active'">13</span>
        <span>满意率</span>
        <span v-show='object.satisfiedNum>0'>{{(100*object.satisfiedNum/(object.satisfiedNum+object.dissatisfiedNum)).toFixed(2)}}%</span>
      </li>


    </ul>
  </div>
</template>

<script>
export default {
  // ['title', 'list']
  props: {
    title: {
      type: String,
      default: ''
    },
    object: {
      type: Object,
      default: null
    },
    height: {
      type: Number,
      default: null
    }
  },
  methods:{
    setName(){

    }
  }
}
</script>

<style lang="less" scoped>

.rank {
  padding: 0 32px 32px 72px;

  .list {
    margin: 0;
    padding: 0;
    list-style: none;

    li {
      margin-top: 16px;

      span {
        color: rgba(0, 0, 0, .65);
        font-size: 14px;
        line-height: 22px;

        &:first-child {
          background-color: #f5f5f5;
          border-radius: 20px;
          display: inline-block;
          font-size: 12px;
          font-weight: 600;
          margin-right: 24px;
          height: 20px;
          line-height: 20px;
          width: 20px;
          text-align: center;
        }
        &.active {
          background-color: #314659;
          color: #fff;
        }
        &:last-child {
          float: right;
        }
      }
    }
  }
}

.mobile .rank {
  padding: 0 32px 32px 32px;
}

</style>